package com.ruoyi.common.utils.excl.workbook;

import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.Workbook;

public class CellCenterStrategy implements CellStyleStrategy{

    private static CellCenterStrategy cellCenterStrategy = new CellCenterStrategy();

    private CellCenterStrategy(){};

    public static CellCenterStrategy getInstance() {
        return cellCenterStrategy;
    }

    @Override
    public void setTemplateCellStyle(Workbook workbook, CellStyle cellStyle) {
        cellStyle.setAlignment(HorizontalAlignment.CENTER);
    }
}
